package com.victualler.business.customer.service;

import com.victualler.business.customer.dto.PreCustomerInfoDto;
import com.victualler.business.customer.dto.dataview.MounthQuantityDto;
import com.victualler.business.customer.dto.print.PreCustomerPrintDto;
import com.victualler.business.customer.dto.request.weixin.WxOrderRequestDto;
import com.victualler.business.customer.entity.PreCustomerOrderDao;
import com.victualler.business.customer.repository.PreCustomerOrderQueryRepository;
import com.victualler.business.customer.repository.PreCustomerOrderRepository;
import com.victualler.core.base.service.BaseService;

import javax.transaction.Transactional;
import java.util.List;


/**
 * @author: Guoshichang
 * @discription:
 */
public interface PreCustomerOrderService extends BaseService<PreCustomerOrderDao, PreCustomerOrderRepository,PreCustomerOrderQueryRepository>{
    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param id 预订单id
     * @Function  根据条件入参prePurchaseRequestDto动态分页查询权限
     */
    public PreCustomerInfoDto findInfo(Long id);

    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param preCustomerInfoDto 预订单实体大对象
     * @Function  保存预订单实体大对象
     */
    public void saveInfo(PreCustomerInfoDto preCustomerInfoDto);

    /**
     * @author Guoshichang
     * @since 18:01 on 2018/10/9.
     * @param preCustomerOrderDao 审查大对象
     * @return
     * @Function
     */
    public void check(PreCustomerOrderDao preCustomerOrderDao);

    /**
     * @author Guoshichang
     * @since 13:39 on 2018/7/7.
     * @param id 预订单id
     * @Function  删除草稿订单
     */
    @Transactional
    public void deleteInfo(Long id);

    /**
     * @author Guoshichang
     * @since 12:46 on 2018/11/14.
     * @param orderNo 订单号
     * @return 输出pdf的列表
     * @Function
     */
    public List<PreCustomerPrintDto> getExportModelList(String orderNo);

    /**
     * @author Guoshichang
     * @since 12:46 on 2018/11/14.
     * @param orderNo 订单号
     * @return 输出pdf的列表
     * @Function 根据订单号将明细数据输出到TXT文件的String字符串中 用于对接系统
     */
    public String getExportModelText(String orderNo);

    /**
     * @author Guoshichang
     * @since 12:00 on 2019/1/18.
     * @param wxOrderRequestDto 微信购物车下单大对象
     * @return 无
     * @Function  将微信报货单报货对象
     */
    public void sendWeiXinOrder(WxOrderRequestDto wxOrderRequestDto);



    public List<MounthQuantityDto> getSumQuantityDataView();

    /**
     * @author Guoshichang
     * @since 11:52 on 2019/1/31.
     * @param null
     * @return
     * @Function 获得前三十天内销量top10商品
     */
    public List<MounthQuantityDto> getQuantityByGoods();

    /**
     * @author Guoshichang
     * @since 11:52 on 2019/1/31.
     * @param null
     * @return
     * @Function 获得前三十天内销量top10的商家
     */
    public List<MounthQuantityDto> getQuantityByCustomer();
}
